net/http.transferWriter.ContentLength (field)
20 uses
	net/http (current package)
		transfer.go#L65: 	ContentLength    int64 // -1 means unknown, 0 means exactly none
		transfer.go#L94: 		t.ContentLength = rr.outgoingLength()
		transfer.go#L95: 		if t.ContentLength < 0 && len(t.TransferEncoding) == 0 && t.shouldSendChunkedRequestBody() {
		transfer.go#L105: 		if t.ContentLength != 0 && !isKnownInMemoryReader(t.Body) {
		transfer.go#L117: 		t.ContentLength = rr.ContentLength
		transfer.go#L130: 			t.ContentLength = -1
		transfer.go#L137: 			t.ContentLength = -1
		transfer.go#L139: 			t.ContentLength = 0
		transfer.go#L172: 	if t.ContentLength >= 0 || t.Body == nil { // redundant checks; caller did them
		transfer.go#L226: 			t.ContentLength = 0
		transfer.go#L257: 	if t.ContentLength > 0 {
		transfer.go#L260: 	if t.ContentLength < 0 {
		transfer.go#L267: 	if t.ContentLength == 0 && isIdentity(t.TransferEncoding) {
		transfer.go#L294: 		if _, err := io.WriteString(w, strconv.FormatInt(t.ContentLength, 10)+"\r\n"); err != nil {
		transfer.go#L298: 			trace.WroteHeaderField("Content-Length", []string{strconv.FormatInt(t.ContentLength, 10)})
		transfer.go#L364: 		} else if t.ContentLength == -1 {
		transfer.go#L371: 			ncopy, err = t.doBodyCopy(w, io.LimitReader(body, t.ContentLength))
		transfer.go#L390: 	if !t.ResponseToHEAD && t.ContentLength != -1 && t.ContentLength != ncopy {
		transfer.go#L392: 			t.ContentLength, ncopy)
|  | The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |